<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script language="javascript" src="/js/jquery-1.8.0.min.js"></script>
    <title>会员列表 - 票付通分销平台</title>
</head>
<body>
<link rel="stylesheet" href="/css/aliceui.min.css"/>
<link rel="stylesheet" href="/css/resetui.css"/>
<link rel="stylesheet" href="/css/page.css"/>
<link rel="stylesheet" href="css/list.css"/>
<style type="text/css">
    .dname_input{
        border:0 none;
    }
    .red{
        color:#FF0000;
    }
    .green{
        color:#009005;
    }
    .gray{
        color:#999;
    }
    .fenyeiWrap{
        clear: none;
    }
    .ui-table td{
        border-bottom:1px solid #999;
    }
    .com_type{
        color: #b70725;
    }
    .pinput-txt{
        width: 200px; height: 22px;line-height: 22px;border:1px solid #CCC;
    }
	.pinput-txt_a{
        width: 50px; height: 20px;line-height: 20px;border:1px solid #CCC;margin-top:5px;margin-bottom:5px;
    }
	.pinput-txt_b{
        width: 25px; height: 20px;line-height: 20px;border:1px solid #CCC;margin-top:5px;margin-bottom:5px;
    }
	h4{text-align:center;}
	.wid80{ width: 90px; height: 20px;line-height: 20px;border:1px solid #CCC;margin-top:5px;margin-right:10px;margin-bottom:5px;}
	.wid90{ width: 50px; height: 20px;line-height: 20px;border:1px solid #CCC;margin-top:5px;margin-left:35px;margin-bottom:5px;}
	.tl_z{margin-right:25px;}
	.tl_f{margin-left:25px;}
	.tips{margin-left:-20px;}
	.tl{margin-left:15px;}
	p {line-height: 3;}
	</style>
<div class="wrap">
    <form name="ourform" class="search_form ">
        <input name="gid" type="hidden" value="<?=$_GET['gid']?>"/>
        <input name="act" type="hidden" id="act"/>
        <fieldset class="search-box">
        <legend>会员查询</legend>
        <table class="search-tbl" cellspacing="0">
            <tr>
                <td class="tab1">
                    <label class="t">查询条件:</label>
                    <select name="searchType" id="search1">
                        <option value="-1">--请选择--</option>
                        <option value="1" <?=$_GET['searchType']==1? 'selected':'';?>>企业名</option>
                        <option value="2" <?=$_GET['searchType']==2? 'selected':'';?>>姓名</option>
                        <option value="3" <?=$_GET['searchType']==3? 'selected':'';?>>手机号</option>
                        <option value="4" <?=$_GET['searchType']==4? 'selected':'';?>>支付宝账号</option>
                        <option value="5" <?=$_GET['searchType']==5? 'selected':'';?>>ID</option>
                        <option value="6" <?=$_GET['searchType']==6? 'selected':'';?>>接口编码</option>
                        <option value="7" <?=$_GET['searchType']==7? 'selected':'';?>>账号</option>
                    </select>
                    <input type="text" name="squery" class="input-txt" id="squery" value="<?=$_GET['squery']?>"/>
                </td>
                <td class="tab2">
                    <label class="t">会员类型</label>
                    <select name="dtype">
                        <option value="-1">选择</option>
                        <option value="0" <?=isset($_GET['dtype']) && $_GET['dtype']==0? 'selected':'';?>>供应商</option>
                        <option value="1" <?=$_GET['dtype']==1? 'selected':'';?>>分销商</option>
                        <option value="2" <?=$_GET['dtype']==2? 'selected':'';?>>资源方</option>
                        <option value="5" <?=$_GET['dtype']==5? 'selected':'';?>>普通会员</option>
                        <option value="6" <?=$_GET['dtype']==6? 'selected':'';?>>员工</option>
                        <option value="7" <?=$_GET['dtype']==7? 'selected':'';?>>集团</option>
                    </select>
                </td>
                <td>
                    <label class="t">状态</label>
                    <select name="status">
                        <option value="0">正常</option>
                        <option value="1" <?=$_GET['status']==1? 'selected':'';?>>禁用</option>
                        <option value="3" <?=$_GET['status']==3? 'selected':'';?>>未审核</option>
                        <option value="2" <?=$_GET['status']==2? 'selected':'';?>>删除</option>
                    </select>
                </td>
                <td>
                    <label class="t">注册时间:</label>
                    从<input readonly="readonly" class="t1 tt1 w80 input-txt" type="text" name="btime1" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)" value="<?=$params['bt1']?>"/>
                    至<input type="text" class="t2 tt1 w80 input-txt" readonly="readonly" name="etime1" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)" value="<?=$params['et1']?>"/>
                </td>
                <td>
                    <button id="searchBtn" type="submit" class="ui-button ui-button-lorange">查  找</button>
                    <button id="ExcelBtn" type="button" class="ui-button ui-button-lorange_a">导  出</button>
                </td>
            </tr>
        </table>
    </fieldset>
    </form>
<!---->
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post" target="hideFrame">
    <div class="ui-table-container">
        <table class="ui-table ui-table-noborder"><!-- 可以在class中加入ui-table-inbox或ui-table-noborder分别适应不同的情况 -->
            <thead>
            <tr>
                <th>编号</th>
                <!--<th>创建时间</th>-->
                <th>身份</th>
                <th style="width:10%;">企业名</th>
                <th>ID</th>
                <th>接口编码</th>
                <th>联系人</th>
                <th>手机</th>
                <th>账户余额</th>
                <th>支付宝账号</th>
                <th>状态</th>
                <th>登录/创建时间</th>
                <?if(!$_GET['gid']):?>
                <th>操作</th>
                <?endif;?>
            </tr>
            </thead>
            <tbody id="mem_list_tbd">
            <?foreach($mem_list as $list):?>
            <?
            $dname = urlencode($list['dname']);
            $money = $mem->ShowBalance($list['id'])/100;
            if($money>0) $m_c = 'red';
            elseif($money<0) $m_c = 'green';
            else $m_c = 'gray';
            ?>
            <tr>
                <td class="mid" data-mid="<?=$list['id']?>">
                    <input type="checkbox" name="mid[]" value="<?=$list['id'].'|'.$list['dtype']?>"/>
                    <?=$list['id']?>
                    <br/><a href="javascript:;" data-id="<?=$list['id']?>" class="edit">修改</a>
                    <br/><a href="javascript:;" data-id="<?=$list['id']?>" class="alliance">转化联盟</a>
                </td>
                <td><?=$LD[$list['dtype']]?></td>
                <td id="editInfo_<?=$list['id']?>" data-ast="<?=$list['add_saler_type']?>" data-jt-acc="<?=$list['jiutian_auth']?>" data-refund_back="<?=$list['refund_back']?>">
                    [<span class="com_type"><?=$list['com_type']?></span>]
                    <span class="dname"><?=$list['dname']?></span>
                </td>
                <td><?=$list['account']?></td>
                <td id="dcode_<?=$list['id']?>"><?=$list['dcode']?></td>
                <td><span class="sex" data-fid="<?=$list['eid'].'|'.$list['fid']?>"><?=$list['sex']=='M'? '[先生]':'[女士]'?></span><?=$list['cname']?></td>
                <td><?=$list['mobile']?></td>
                <td><span class="<?=$m_c?>"><?=$money?></span></td>
                <td><?=$list['alipay']?></td>
                <td class="status"><?=$LS[$list['status']]?></td>
                <td>登录:<?=$list['lasttime']?><br/>创建:<?=$list['creattime']?></td>
                <?if(!$_GET['gid']):?>
                <td>
                    <?if($list['dtype']==7):?>
                    <a target="_blank" href="/g_info.html?id=<?=$list['id']?>">详情</a>
                    <a target="_blank" href="relations.php?t=<?=$dname?>&id=<?=$list['id']?>&type=3&group=1">成员</a>
                    <?else:?>
                        <?if($list['dtype']==0):?>
                        <a target="_blank" href="relations.php?t=<?=$dname?>&id=<?=$list['id']?>&type=1">分销商</a>
                        <a target="_blank" href="relations.php?t=<?=$dname?>&id=<?=$list['id']?>&type=2">资源方</a>
                        <?endif;?>
                        <?if($list['dtype']==1 || $list['dtype']==0 ):?>
                        <a target="_blank" href="/rechDist.html?id=<?=$list['id']?>">充值</a>
                        <?endif;?>
                        <a target="_blank" href="relations.php?t=<?=$dname?>&id=<?=$list['id']?>&type=0">供应商</a>
                        <br/>
                        <a target="_blank" href="relations.php?t=<?=$dname?>&id=<?=$list['id']?>&type=3">员工</a>
                        <a target="_blank" href="/userinfo.html?id=<?=$list['id']?>">详情</a>

                        <?if($list['status']==3):?>
                            <a href="javascript:;" class="verify" data-status="0">通过</a>
                            <a href="javascript:;" class="verify" data-status="1">拒绝</a>
                        <? elseif($list['status']==0):?>
                            <a href="javascript:;" class="verify" data-status="1">禁用</a>
                            <?elseif($list['status']==1):?>
                        <a href="javascript:;" class="verify" data-status="0">启用</a>
                        <?endif;?>
                    <?endif;?>
                    <a target="_blank" href="/saleList.html?id=<?=$list['id']?>">售卖产品</a>
                </td>
                <?endif;?>
            </tr>
            <?endforeach;?>
            </tbody>
        </table>
        <div class="list-foot">
            <?if(isset($_GET['gid']) && is_numeric($_GET['gid'])):?>
            <input name="gid" type="hidden" value="<?=$_GET['gid']?>"/>
            <iframe id="hideFrame" name="hideFrame" src="about:blank"
                    frameborder="0" style="display: none;width: 0;height: 0;"></iframe>
            <div class="left" style="float: left; width: 100px;">
                <button type="submit" >合并供应商到集团</button>
            </div>
            <?endif;?>
            <?page($total_rows,$currentPage,$pageSize);?>
        </div>
    </div>
    </form>
</div>
<script type="text/javascript" src="/js/Calendar.js"></script>
<script type="text/javascript" src="/js/moment.min.js"></script>
<script type="text/javascript" src="/js/d.js"></script>
<link rel="stylesheet" href="/css/easydialog.css"/>
<script type="text/javascript" src="/js/easydialog.min.js"></script>
<script type="text/javascript" src="admin.js"></script>
</body>
</html>
